<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%
	String mode=request.getParameter("mode");
	
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="css/index.css">
<title>群 组</title>
</head>
<!--头部 -->
<%@include file="head.jsp"%>

<!--main -->
<div class="luntan_13_top">
	<img src="imges/bj2.png">
</div>

<!--main -->
<div class="fenlei">
<div class="fenlei_main">
    <div class="fenlei_top">
        <a href="indexController.do?group"><img src="imges/home.png"></a>&nbsp;&gt;&nbsp;<a href="#">群组</a>&nbsp;&gt;&nbsp;<a href="groupController.do?mygroup">我的群组</a>
    </div>
    <div class="qunzu_con">
        <div class="qunzu_con_l">
            <div class="qunzu_top">
                <span class="qunzu_top_l">
                <%
                	String bd="",myth="",join="",manager="";
                	if(mode==null || mode==""){
                		bd="border-bottom: 1px solid #ff6600;color: #ff6600;";
                	}else if("mythread".equals(mode)){
                		myth="border-bottom: 1px solid #ff6600;color: #ff6600;";
                	}else if("join".equals(mode)){
                		join="border-bottom: 1px solid #ff6600;color: #ff6600;";
                	}else if("manager".equals(mode)){
                		manager="border-bottom: 1px solid #ff6600;color: #ff6600;";
                	}
                %>
                <a style="<%=bd %>" href="groupController.do?mygroup&mode=">群组话题</a>
                <a style="<%=myth %>" href="groupController.do?mygroup&mode=mythread">我的话题</a>
                <a style="<%=join %>" href="groupController.do?mygroup&mode=join">我的参与</a>
                <a style="<%=manager %>" href="groupController.do?mygroup&mode=manager">我管理的</a></span>
                <span class="qunzu_top_r"><a href="#">关注群组</a><a href="#">所有群组</a></span>
                <span style=" clear:both; display:block;"></span>
            </div>
            <div class="qunzu_p">
            	<%
            		if("mythread".equals(mode)){
            	%>
            		我的话题列表
            	<%}else if("join".equals(mode)){ %>
            		 <div style="width:100%;padding: 10px 0px;"> 
		                <div style=" padding:0px 20px; border-bottom: 0px solid #f1f1f1;color:#666">
		                	 <c:forEach items="${myjoingroups}" var="item">
			                    <div style=" float:left;text-align: center;margin-right:10px;">
			               			<div style=" border:1px solid #f1f1f1; border-radius:5px;padding: 5px 5px 5px 5px;">
			               				<img src="imges/group_351_icon.jpg"></div>
			               				<span>${fn:length(item.group_name)>4 ? fn:substring(item.group_name,0,4) : item.group_name }</span>
			               			</div>
		               		</c:forEach>
		                    <div style=" clear:both;"></div>
		                </div>
		            </div>
            	<%}else if("manager".equals(mode)){ %>
            		 <p style="padding: 0px 20px;"> 
		                <div style=" padding:15px 20px; border-bottom: 1px solid #f1f1f1;color:#666">
		                	 <c:forEach items="${mymagroups}" var="item">
			                    <div style=" float:left;">
			               			<p style=" border:1px solid #f1f1f1; border-radius:5px;padding: 5px 5px 1px 5px;">
			               				<img src="imges/group_351_icon.jpg"></p><span>${fn:length(item.group_name)>4 ? fn.length(item.group_name,0,4) : item.group_name }</span></div>
		               		</c:forEach>
		                    <div style=" clear:both;"></div>
		                </div>
            	<%}else{ %>
                <p style="padding: 0px 20px;">
	                <select>
	                	<option>全部</option>
	                	<option>很少</option>
	                </select>
	                <c:forEach items="${groupClass}" var="item">
	                	<span><a style="color:#666;" href="groupController.do?mygroup&mode=typeid=${item.id }">${item.group_name }</a></span>
	                </c:forEach>
                </p>
                <div style="padding:0px 0px 0px 20px; border-bottom:1px solid #f1f1f1;color:#666">
                    <span style=" width:70px; text-align:center; height:27px; line-height:27px;
                    display:inline-block; margin-top:-5px;margin-left:100px;">主题</span>
                    <span style=" float:right; width:60px; text-align:center;margin-right:23px;">查看</span>
                    <span style=" float:right; margin-right:10px; width:60px;text-align:center;">回复</span>
                    <span style=" display:block; clear:both;"></span>
                </div>
                <c:forEach items="${articles}" var="ar">
	                <div style=" padding:10px 20px; border-bottom: 1px solid #f1f1f1;color:#666">
	                    <div style=" float:left;">
	                        <img src="imges/qunzu/1.png">
	                        <span style=" display:inline-block; margin-left:5px;">
	                        <span style="font-size: 12px;"><a href="groupController.do?thread&ard=${ar.id}" style="color:#666;">${ar.title }</a></span><br>
	    					<span style=" font-size:10px;margin-top:5px;">最后发表：${ar.user_name }&nbsp;&nbsp;<img src="imges/qunzu/v2.png">&nbsp;&nbsp;${ar.last_publish_time }</span>
	                        </span>
	                    </div>
	                    <div style=" float:right; line-height:30px;">
	                        <span style=" width:65px; text-align:center;display:inline-block;color:#006fcc">
	                        <img style=" vertical-align:sub" src="imges/huifu.jpg">&nbsp;${ar.reply_account }</span>
	                        <span style=" width:65px; text-align:center; display:inline-block">
	                        <img style=" vertical-align:sub" src="imges/qunzu/2.png">&nbsp;${ar.view_account }</span>
	                    </div>
	                    <div style=" clear:both;"></div>
	                </div>
                </c:forEach>
                  
		          <div class="pgt" style="margin-top: 10px; width:700px">
		           <div class="pgt_img"></div>
		           <div class="pg">
		           <span class="pgb"><a href="">上一页</a></span>
		            <a href="">1</a>
		           <a href="">2</a>
		           <a href="">3</a>
		           <a href="">4</a>
		           <a href="">5</a>
		           <a href="">6</a>
		           <a href="">7</a>
		          <label>
		          <span title="共 228 页"> ......</span></label>
		          <a href="" class="nxt">下一页</a></div></div>  
		        <%} %>
         </div>
        </div>
        <div class="qunzu_con_r">
            <div class="qunzu_buzhou" style=" background:#fff;">
                <p class="buzhou">创建群组步骤</p>
                <div>
                    <ul style="margin:0px; padding:0px;">
                        <li style="padding:15px 0px 15px 20px;"><a href="#" style="color:#000">
                        <img src="imges/qunzu/+.png" style=" height:44px; width:44px;">
                        <span style=" display:inline-block; vertical-align: top; margin-left:10px;">创建群组<br>创建自己的地盘</span></a></li>
                        <li style=" border-top:1px dashed #f1f1f1; padding:15px 0px 15px 20px;"><a href="#" style="color:#000">
                        <img src="imges/qunzu/-.png" style=" height:44px; width:44px;">
                        <span style=" display:inline-block; vertical-align: top; margin-left:10px;">创建群组<br>创建自己的地盘</span></a></li>
                        <li style=" border-top:1px dashed #f1f1f1; padding:15px 0px 15px 20px;"><a href="#" style="color:#000">
                        <img src="imges/qunzu/geren.png" style=" height:44px; width:44px;">
                        <span style=" display:inline-block; vertical-align: top; margin-left:10px;">创建群组<br>创建自己的地盘</span></a></li>
                        <li style="border-top:1px dashed #f1f1f1;border-bottom:1px dashed #f1f1f1;padding:15px 0px 15px 20px;">
                        <a href="#" style="color:#000">
                        <img src="imges/qunzu/shengji.png" style=" height:44px; width:44px;">
                        <span style=" display:inline-block; vertical-align: top; margin-left:10px;">创建群组<br>创建自己的地盘</span></a></li>
                    </ul>
                    
                    <div style=" text-align:center; margin-top:10px; padding-bottom:15px;"><img src="imges/qunzu/shuyu.png"></div>
                </div>
            </div>
            <div style=" height:10px;"></div>
            <div class="qunzu_paihang">
                <p class="buzhou">群组积分排行</p>
                <ul class="qunzu_paihang_ul">
                    <li>
                    <span style=" float:left;color:#666">NO.1 徐柏华命理教学</span><span style="float:right;color:#666">1962</span></li>
                    <li>
                    <span style=" float:left;color:#666">NO.2 大千喔喔易学培训</span><span style="float:right;color:#666">719</span></li>
                    <li>
                    <span style=" float:left;color:#666">NO.3 奇门遁甲研究会</span><span style="float:right;color:#666">146</span></li>
                    <li>
                    <span style=" float:left;color:#666">NO.4 建烨信息策划中心</span><span style="float:right;color:#666">141</span></li>
                    <li>
                    <span style=" float:left;color:#666">NO.5 大千喔喔易学培训</span><span style="float:right;color:#666">719</span></li>
                    <li>
                    <span style=" float:left;color:#666">NO.6 奇门遁甲研究会</span><span style="float:right;color:#666">146</span></li>
                    <li>
                    <span style=" float:left;color:#666">NO.7 建烨信息策划中心</span><span style="float:right;color:#666">141</span></li>
                </ul>
                <div style="clear:both;"></div>
            </div>
        </div>
        <div style="clear:both;"></div>
    </div>    
</div>

<div style="clear:both"></div>
</div>
<!--foot -->
<%@include file="foot.jsp"%>

</body>
</html>
<script type="text/javascript">
function addGroup(){
	alert("加入群组");
}
</script>